/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jrill.notification;

import java.util.Map;

/**
 * Interface of notification message template.
 * This arrows applications to send deformable notification message.
 * 
 * @author K.Waga <kzwaga@gmail.com>
 */
public interface MessageTemplate {
    /**
     * Set message sender name template.
     * @param fromName message sender name template.
     */
    void setFromName(String fromName);
    /**
     * Returns evaluated(merged/concatinated) value of message sender name template with variables on context.
     * @return sender name
     */
    String evaluateFromName();
    /**
     * Set message subject template.
     * @param subject subject template
     */
    void setSubject(String subject);
    /**
     *  Returns evaluated(merged/concatinated) value of message Subject template with variables on context.
     * @return subject
     */
    String evaluateSubject();
    /**
     * Set the message body template.
     * @param body body template
     */
    void setBody(String body);
    /**
     * Returns evaluated(merged/concatinated) value of message body template with variables on context.
     * @return
     */
    String evaluateBody();
    /**
     * Set the link url template in message.
     * @param url url template
     */
    void setLinkUrl(String url);
    /**
     * Returns evaluated(merged/concatinated) value of link url template with variables on context.
     * @return
     */
    String evaluateLinkUrl();
    /**
     * Set the message context. values on that context must be reffered as ${name} by subject template, body template and link url template.
     * @param context key-value style variable context.
     */
    void setContext(Map context);
}
